<script LANGUAGE="JavaScript">
	// Determine browser.
		var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
		var isMinIE4 = (document.all) ? 1 : 0;
		var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.")) >= 0 ? 1 : 0;

	//variables specific to this page
	    var childActive = null
	    var lastHighlight = null
	    var active = false
		var menuActive = null
</script>

<script LANGUAGE="JavaScript">
function navBarInit() {
	//DO NOT REMOVE - THIS IS FOR BACKWARD COMPATIBILITY	
}   
	
	
    function getReal(el) {
      // Find a table cell element in the parent chain */
      temp = el
      while ((temp!=null) && (temp.tagName!="TABLE") && (temp.className!="root") && (temp.id!="menuBar")) {
        if (temp.tagName=="TD")
          el = temp
        temp = temp.parentElement
      }
      return el
    }

    function raiseMenu(el) { //when the user mouseout's from the menu heading, this happens
		el.style.borderRight	= "1px #848AAD solid"
		el.style.borderLeft		= "1px #848AAD solid" 
		el.style.borderTop		= "1px #848AAD solid"
		el.style.borderBottom	= "0px #ffffff solid"
		el.style.background		= "#848AAD"
    }

    function clearHighlight(el) { //same as raiseMenu
      if (el==null) return
		el.style.borderRight	= "1px #848AAD solid"
		el.style.borderLeft		= "1px #848AAD solid" 
		el.style.borderTop		= "1px #848AAD solid"
		el.style.borderBottom	= "0px #ffffff solid"
		el.style.background		= "#848AAD"
    }

    function sinkMenu(el) { //when the user mouseover's on the menu heading, this happens
		el.style.borderRight	= "1px #444444 solid"
		el.style.borderLeft		= "1px #444444 solid" 
		el.style.borderTop		= "1px #444444 solid"
		el.style.borderBottom	= "0px #444444 solid"
		el.style.background		= "#ADB2C6"
    }

    function menuHandler(menuItem) {
      // Write generic menu handlers here!
      // Returning true collapses the menu. Returning false does not collapse the menu
      return true
    }

    function getOffsetPos(which,el,tagName) {
      var pos = 0 // el["offset" + which]
      while (el.tagName!=tagName) {
        pos+=el["offset" + which]
        el = el.offsetParent
      }
      return pos	
    }

    function getRootTable(el) {
      el = el.offsetParent
      if (el.tagName=="TR") 
        el = el.offsetParent
      return el
    }

    function getElement(el,tagName) {
      while ((el!=null) && (el.tagName!=tagName) )
        el = el.parentElement
      return el
    }

    function processClick() {
      var el = getReal(event.srcElement)
      if ((getRootTable(el).id=="menuBar") && (active)) {        
        cleanupMenu(menuActive)
        clearHighlight(menuActive)
        active=false
        lastHighlight=null
        doHighlight(el)
      }
      else {
        if ((el.className=="root") || (!menuHandler(el)))
          doMenuDown(el)
        else {
          if (el._childItem==null) 
            el._childItem = getChildren(el)
          if (el._childItem!=null)  return;
          if ((el.id!="break") && (el.className!="disabled") && (el.className!="disabledhighlight") && (el.className!="clear"))  {
            if (menuHandler(el)) {
              cleanupMenu(menuActive)
              clearHighlight(menuActive)
              active=false
              lastHighlight=null
            }
          }
        }
      }
    }

    function getChildren(el) {
      var tList = el.children.tags("TABLE")
      var i = 0
      while ((i<tList.length) && (tList[i].tagName!="TABLE"))
        i++
      if (i==tList.length)
        return null
      else
        return tList[i]
    }

    function doMenuDown(el) {   
		
      if (el._childItem==null) 
        el._childItem = getChildren(el)
              		              
      if ((el._childItem!=null) && (el.className!="disabled") && (el.className!="disabledhighlight")) {
        // Performance Optimization - Cache child element
        ch = el._childItem                
        if (ch.style.display=="block") {					
          removeHighlight(ch.active)
          return
        }

        ch.style.display = "block"
        if (el.className=="root") {                
          ch.style.pixelTop = el.offsetHeight + el.offsetTop + 0  //space between root and drop down menu
          ch.style.pixelLeft = el.offsetLeft + 0
	  if (ch.style.pixelWidth==0)
            ch.style.pixelWidth = ch.rows[0].offsetWidth+50
          sinkMenu(el)
          active = true
          menuActive = el
        } 
        else 
        {
          childActive = el
          ch.style.pixelTop = getOffsetPos("Top",el,"TABLE") -3 // el.offsetTop + el.offsetParent.offsetTop - 3
          ch.style.pixelLeft = el.offsetLeft + el.offsetWidth
			if (ch.style.pixelWidth==0)
				ch.style.pixelWidth = ch.offsetWidth+50
        }     
      }
    }
 
    function doHighlight(el) {
       
    //Added by Christophe
    window.event.srcElement.style.cursor = "hand";    
    //To hightlight the menu root 
    if ("root"==el.className) {            
		sinkMenu(el)
    }
    
    //Hides the combo                
	sHideNumber = window.event.srcElement.id;
	HideCombo(sHideNumber);
    
      el = getReal(el)  
                      
      if ("root"==el.className) {            
        if ((menuActive!=null) && (menuActive!=el)) {						
          clearHighlight(menuActive)
        }
        if (!active) {                            
          raiseMenu(el)
        }          
        else {
          sinkMenu(el)
          }
                   
        //to allow showing drop down without clicking
        //if ((active) && (menuActive!=el)) {			
          cleanupMenu(menuActive)                              
          doMenuDown(el)                    
        //}
        
        menuActive = el  
        lastHighlight=null
      }
      else {
        if (childActive!=null) 
          if (!childActive.contains(el)) 
            closeMenu(childActive, el)    

        if (("TD"==el.tagName) && ("clear"!=el.className)) {
          var ch = getRootTable(el)         
          if (ch.active!=null) {
            if (ch.active!=el) {
              if (ch.active.className=="disabledhighlight")  
                ch.active.className="disabled"
              else
                ch.active.className=""
              }
            }
          ch.active = el
          lastHighlight = el
          if ((el.className=="disabled") || (el.className=="disabledhighlight") || (el.id=="break")) 
            el.className = "disabledhighlight"
          else {
            if (el.id!="break") {
              el.className = "highlight"
              if (el._childItem==null) 
                el._childItem = getChildren(el)
              if (el._childItem!=null) {
                doMenuDown(el)
              }
            }  
          }
        }
      }
    }

    function removeHighlight(el) {
      if (el!=null)
        if ((el.className=="disabled") || (el.className=="disabledhighlight"))  
          el.className="disabled"
        else
          el.className=""
    }

    function cleanupMenu(el) {		

      if (el==null) return
      for (var i = 0; i < el.all.length; i++) {      
        var item = el.all[i]
        if (item.tagName=="TABLE")
         item.style.display = ""
        removeHighlight(item.active)
        item.active=null        
      }
    }




    function closeMenu(ch, el) {
      var start = ch      
            
      while (ch.className!="root") {
          ch = ch.parentElement
          if (((!ch.contains(el)) && (ch.className!="root"))) {
            start=ch
          }
      }
		ShowCombo();      

      cleanupMenu(start)
    }

    function doCheckOut() {
 
//      if (document.all.menuBar==null) return
//      if ((!document.all.menuBar.contains(event.srcElement)) && (menuActive!=null)) {			

		clearHighlight(menuActive)

      //var el = event.toElement       
      //if ((!active) && (menuActive!=null) && (!menuActive.contains(el))) {        		
      // clearHighlight(menuActive)
      //  menuActive=null
      //}
//    //  checkMenu
    }


    function processKey() {
      if (active) {
        switch (event.keyCode) {
         case 13: lastHighlight.click(); break;
         case 39:  // right
           if ((lastHighlight==null) || (lastHighlight._childItem==null)) {
             var idx = menuActive.cellIndex
//             if (idx==menuActive.offsetParent.cells.length-2)
             if (idx==getElement(menuActive,"TR").cells.length-2)
               idx = 0
             else
               idx++
             newItem = getElement(menuActive,"TR").cells[idx]
           } else
           {
             newItem = lastHighlight._childItem.rows[0].cells[0]
           }
           doHighlight(newItem)
           break; 
         case 37: //left
           if ((lastHighlight==null) || (getElement(getRootTable(lastHighlight),"TR").id=="menuBar")) {
             var idx = menuActive.cellIndex
             if (idx==0)
               idx = getElement(menuActive,"TR").cells.length-2
             else
               idx--
             newItem = getElement(menuActive,"TR").cells[idx]
           } else
           {
             newItem = getElement(lastHighlight,"TR")
             while (newItem.tagName!="TD")
               newItem = newItem.parentElement
           }
           doHighlight(newItem)
           break; 
         case 40: // down
            if (lastHighlight==null) {
              itemCell = menuActive._childItem
              curCell=0
              curRow = 0
            }
            else {
              itemCell = getRootTable(lastHighlight)
              if (lastHighlight.cellIndex==getElement(lastHighlight,"TR").cells.length-1) {
                curCell = 0
                curRow = getElement(lastHighlight,"TR").rowIndex+1
                if (getElement(lastHighlight,"TR").rowIndex==itemCell.rows.length-1)
                  curRow = 0
              } else {
                curCell = lastHighlight.cellIndex+1
                curRow = getElement(lastHighlight,"TR").rowIndex
              }
            }
            doHighlight(itemCell.rows[curRow].cells[curCell])
            break;
         case 38: // up
            if (lastHighlight==null) {
              itemCell = menuActive._childItem
              curRow = itemCell.rows.length-1
              curCell= itemCell.rows[curRow].cells.length-1

            }
            else {
              itemCell = getRootTable(lastHighlight)
              if (lastHighlight.cellIndex==0) {
                curRow = getElement(lastHighlight,"TR").rowIndex-1
                if (curRow==-1)
                  curRow = itemCell.rows.length-1
                curCell= itemCell.rows[curRow].cells.length-1

              } else {
                curCell = lastHighlight.cellIndex - 1
                curRow = getElement(lastHighlight,"TR").rowIndex
              }
            }
            doHighlight(itemCell.rows[curRow].cells[curCell])
            break;
           if (lastHighlight==null) {
              curCell = menuActive._childItem
              curRow = curCell.rows.length-1
            }
            else {
              curCell = getRootTable(lastHighlight)
              if (getElement(lastHighlight,"TR").rowIndex==0)
                curRow = curCell.rows.length-1
              else
                curRow = getElement(lastHighlight,"TR").rowIndex-1
            }
            doHighlight(curCell.rows[curRow].cells[0])
            break;
        }
      }
    }
</script>


<script LANGUAGE="JavaScript">
	function checkMenu() {      		        
      if (document.all.menuBar==null) {
      return
      }

      if ((!document.all.menuBar.contains(event.srcElement)) && (menuActive!=null)) {
        clearHighlight(menuActive)
        closeMenu(menuActive)
        active = false
        menuActive=null
        choiceActive = null               
      }
    }

	document.onclick = checkMenu;
	document.onmouseover = checkMenu;	
	
	function bCheckCombo()	{
		var iValue
		
		if (document.all('cboQFind')) 
			iValue = 1;
		else
			iValue = 0;
	
		return iValue;

	}	
</script>

<script LANGUAGE="VBScript">
sub CallLink(sURL)
	dim sRet

	If sURL = "" then
		Call KeyTaxMessageBox ("There has been a problem with the menu system " & vbcrlf & "Please log off, close Internet Explorer and load the site again " & vbcrlf & "We apoligise for the inconvenience", "Input Error", "Critical")
		'Msgbox("No Link!")
		Exit Sub
	End If
	if trim(document.all.bMenuDirty.value) = "" then
		document.all.bMenuDirty.value = 0
	end if
	If document.all("bMenuClicked").value = 0 then
		if cInt(document.all.bMenuDirty.value) = 1 then
			sRet = msgbox("If you continue without saving the changes, they will be lost!" + vblf + vblf + "Do you want to continue?",vbYesNo + vbQuestion,"   UNSAVED DATA")
			if sRet = vbNo then
				'because otherwise top menu item takes over!
				document.all("bMenuClicked").value = document.all("bMenuClicked").value + 1
				If document.all("bMenuClicked").value > 1 then		
					document.all("bMenuClicked").value = 0
				End If
				exit sub
			else
				document.all.bMenuDirty.value = "0"
			end if
		end if
		
		navigate sURL, Flags=navNoReadFromCache		
	End If

	'because otherwise top menu item takes over!
	document.all("bMenuClicked").value = document.all("bMenuClicked").value + 1
	If document.all("bMenuClicked").value > 1 then		
		document.all("bMenuClicked").value = 0
	End If

end sub
</script>

<script language="JavaScript">
	function HideFrames(iNum) {
		var frm = window.self.frames;
		
		if ((document.forms(0).name).toLowerCase() == "frmmytraderegister" || (document.forms(0).name).toLowerCase() == "trading_online_login") {
			document.all.divTrading.style.display = "none";
			document.all.Loading.style.display = "";
		}
		else {
			for (i=0; i < frm.length; i++) {
				HideIt(frm(i).name, iNum);
			}
		}
	}
		
	function ShowFrames() {
		var frm = window.self.frames;
		
		if ((document.forms(0).name).toLowerCase() == "frmmytraderegister" || (document.forms(0).name).toLowerCase() == "trading_online_login") {
			document.all.divTrading.style.display = "";
			document.all.Loading.style.display = "none";
		}
		else {
			for (i=0; i < frm.length; i++) {
				try {
					ShowIt(frm(i).name);
				}
				catch (exception) {
					//alert(exception);
				}
			}
		}
	}
</script>

<script language="JavaScript">
	function HideFramesMW(iNum) {
		HideItMW("fraMoneyWeb", iNum);
		}
		
	function ShowFramesMW() {
		ShowItMW("fraMoneyWeb");
		}
		
	function HideFramesT(iNum) {
		HideItMW("fraTrading", iNum);
		}
		
	function ShowFramesT() {
		ShowItMW("fraTrading");
		}
		
</script>

<script language="VBScript">
	Sub HideItMW(sName, iNum)		
	
		dim iElement, aMenuArray, iCount
		
		
		If document.all(sName) is nothing then			
			Exit Sub
		End If		
		
		iElement = right(trim(document.all(sName).id), len(trim(document.all(sName).id)) - 4)
		aMenuArray = split(trim(iElement), ",")
				
		For iCount = 0 to ubound(aMenuArray) step 1
			if trim(left(document.all(sName).id, 4)) = "Hide" and trim(aMenuArray(iCount)) = trim(iNum) then				
				If document.all("Loading") is nothing then					
					Exit Sub
				End If				
				document.all("Loading").style.display = ""
				document.all(sName).style.display = "none"
			end if
		Next
	End Sub
	
	Sub ShowItMW(sName)
		dim iElement, aMenuArray, iCount
		
		
		If document.all("Loading") is nothing then
			Exit Sub
		End If		
		
		document.all("Loading").style.display = "none"
		
		
		If document.all(sName) is nothing then
			Exit Sub
		End If		
		
		iElement = right(trim(document.all(sName).id), len(trim(document.all(sName).id)) - 4)
		aMenuArray = split(trim(iElement), ",")

		For iCount = 0 to ubound(aMenuArray) step 1
			if trim(left(document.all(sName).id, 4)) = "Hide" then
				document.all(sName).style.display = ""
			end if
		Next
	End Sub
	
	Sub HideComboMW(iNum)
		dim sTemp, sForm, iTemp, iElement, aMenuArray, iCount
		
		iTemp = left(iNum, len(iNum) - 1)
		iTemp = right(iTemp, len(iTemp) - 1)
		iNum = iTemp
		
		
		If document.forms(0) is nothing then
			Exit Sub
		End If		
		
		sForm = document.forms(0).name
		
		HideFramesMW(iNum)		
		HideFramesT(iNum)
		
		For Each element In	document.all(sForm).elements
			If len(element.id) > 4 Then
				iElement = right(trim(element.id),len(trim(element.id)) - 4)
				aMenuArray = split(trim(iElement), ",")
				For iCount = 0 to ubound(aMenuArray) step 1
					iElement = aMenuArray(iCount)
					If (trim(element.type) = "select-one" or trim(element.type) = "select-multiple") and trim(left(element.id,4)) = "Hide" and trim(iElement) = trim(iNum) Then
						sTemp = element.name
						if document.all(sTemp) is nothing then
							Exit Sub
						end if
						document.all(sTemp).style.display = "none"						
					End If
				Next
			End if
		Next
	End Sub
	
	Sub ShowComboMW(iNum)
		dim sTemp, sForm, iTemp, iElement
		
		iTemp = left(iNum, len(iNum) - 1)
		iTemp = right(iTemp, len(iTemp) - 1)
		iNum = iTemp

		
		If document.forms(0) is nothing then
			Exit Sub
		End If		
		
		sForm = document.forms(0).name
		
		ShowFramesMW()
		ShowFramesT()
		
		For Each element In	document.all(sForm).elements
			If len(element.id) > 4 Then
				iElement = right(trim(element.id),len(trim(element.id)) - 4)
				If (trim(element.type) = "select-one" or trim(element.type) = "select-multiple") and trim(left(element.id,4)) = "Hide"  Then
					sTemp = element.name
					if document.all(sTemp) is nothing then
						Exit Sub
					end if
					document.all(sTemp).style.display = ""					
				End If
			End if
		Next
	End Sub
</script>

<script language="VBScript">
	Sub HideIt(sName, iNum)
		dim iElement, aMenuArray, iCount
		
		
		If document.all(sName) is nothing then
			Exit Sub
		End If		
		
		iElement = right(trim(document.all(sName).id), len(trim(document.all(sName).id)) - 4)
		
		aMenuArray = split(trim(iElement), ",")
		For iCount = 0 to ubound(aMenuArray) step 1
			if trim(left(document.all(sName).id, 4)) = "Hide" and trim(aMenuArray(iCount)) = trim(iNum) then
				document.all(sName).style.display = "none"
			end if
		Next
	End Sub
	
	Sub ShowIt(sName)
		If trim(sName) <> "TimerRefresh" Then
			
			If document.all(sName) is nothing then
				Exit Sub
			End If		
			
			document.all(sName).style.display = ""
		End If
	End Sub
	
	Sub HideCombo(iNum)
		dim sTemp, sForm, iTemp, iElement, aMenuArray, iCount, bResult
		
		'If some elements are still not loaded then cancel menu action
		'otherwise it tries to refer non-loaded components
		bResult = bCheckCombo()
		If bResult = 0 then
			exit sub
		End If		
		
		If Trim(iNum)="" then			
			Exit Sub
		End If		
		
		'With IE4, needs to have Id="xxx1" and can not just have Id="1"
		'Format of Id from menu is Id="xxxxx_1"
		If not isnumeric(iNum) then
			iNum = right(iNum, len(iNum) - Instr(iNum, "_"))
			'checks that if the result is not numeric then can not go further
			If not isnumeric(iNum) then
				Exit Sub
			End If
		End If

		
		If document.all("cboQFind") is nothing then
			Exit Sub
		End If		
		
		'specific to Quick Find combo		
		If cInt(iNum)=7 or cInt(iNum)=8 then
			document.all("cboQFind").style.display = "none"
		Else
			document.all("cboQFind").style.display = ""
		End If
				
		'iTemp = left(iNum, len(iNum) - 1)
		'iTemp = right(iTemp, len(iTemp) - 1)
		'iNum = iTemp
		
		
		If document.forms(0) is nothing then
			exit sub
		End If		
		
		
		sForm = document.forms(0).name

		If document.all(sForm) is nothing then
			Exit Sub
		End If	
				
		if document.all(sForm).name = "calculators" then
			if (document.all("Show") is nothing) or (document.all("Hide") is nothing) then
				exit sub
			end if
			select case iNum
				case 0,1,2,4,5,6,7
					document.all.Hide.style.display = "none"
					document.all.Show.style.display = ""
				case 3,8,9,10
					document.all.Hide.style.display = ""
					document.all.Show.style.display = "none"
			end select
		end if
		if document.all(sForm).name = "DeathPlannerGraph" then
			If cInt(iNum) = 2 or cInt(iNum) = 4 or cInt(iNum) = 5 or cInt(iNum) = 6 Then
				document.all.Hide.style.display = "none"
				document.all.Show.style.display = ""
			end if
		end if
		if document.all(sForm).name = "DisabilityPlannerGraph" then
			If cInt(iNum) = 2 or cInt(iNum) = 4 or cInt(iNum) = 5 or cInt(iNum) = 6 Then
				document.all.Hide.style.display = "none"
				document.all.Show.style.display = ""
			end if
		end if
		If trim(document.all(sForm).name) <> "balance" and trim(document.all(sForm).name) <> "frmTransact" and trim(document.all(sForm).name) <> "frmCharter" and trim(document.all(sForm).name) <> "index_custom" and trim(document.all(sForm).name) <> "goal_planner" and trim(document.all(sForm).name) <> "frmMainDetails" and trim(document.all(sForm).name) <> "frmTabs" and trim(document.all(sForm).name) <> "reports" then
			If lcase(document.all(sForm).name) <> "frmmoneyweb" then				
				HideFrames(iNum)				
				HideFramesT(iNum)
			Else
				If instr(navigator.appversion, "MSIE 4") > 0 then
					HideFramesMW(iNum)
				End If
				If (instr(navigator.appversion, "MSIE 5") > 0) and (instr(navigator.appversion, "MSIE 5.5") = 0) then
					HideFramesMW(iNum)
				End If
			End if
			For Each element In	document.all(sForm).elements
				'Hide Applets				
				If (trim(element.type) = "select-one" or trim(element.type) = "select-multiple") and trim(left(element.id,4)) = "Hide" then					
					If len(element.id) > 4 Then
						iElement = right(trim(element.id),len(trim(element.id)) - 4)
						aMenuArray = split(trim(iElement), ",")
						bFound=false
						sTemp = element.name
						For iCount = 0 to ubound(aMenuArray) step 1
							iElement = aMenuArray(iCount)														
							If trim(iElement) = trim(iNum) then								
								bFound=true
							End If 
						Next
						If document.all(sTemp) is nothing then
							Exit Sub
						End If
						If bFound Then															
							document.all(sTemp).style.display = "none"
						Else							
							document.all(sTemp).style.display = ""
						End If
					End if
				End If
			Next
		elseif trim(document.all(sForm).name) = "frmCharter" then
			'For iCount = 0 to cInt(document.all("lRowNumber").value) step 1
				if iNum = 4 or iNum = 5 then
					'If iCount <> cInt(document.all("lRowNumber").value) or iCount = 0 then
						'document.all("cboOccupation").style.display = "none"
					'End If
					
					If document.all("cboOccupation") is nothing then
						Exit Sub
					End If					
					document.all("cboOccupation").style.display = "none"
					
					If document.all("cboBank") is nothing then
						Exit Sub
					End If
					If document.all("fraBankBranch") is nothing then
						Exit Sub
					End If
					If document.all("fraBroker") is nothing then
						Exit Sub
					End If
					If document.all("cboBeneficiary") is nothing then
						Exit Sub
					End If

					document.all("cboBank").style.display = "none"					
					document.all("fraBankBranch").style.display = "none"
					document.all("fraBroker").style.display = "none"
					document.all("cboBeneficiary").style.display = "none"
				end if
			'Next
		elseif trim(document.all(sForm).name) = "reports" then
		
		end if
	End Sub
	
	Sub ShowCombo()
		dim sTemp, sForm, iTemp, iElement, bResult
	
		'If some elements are still not loaded then cancel menu action
		'otherwise it tries to refer non-loaded components
		bResult = bCheckCombo()
		If bResult = 0 then
			exit sub
		End If

		If document.all("cboQFind") is nothing then
			Exit Sub
		End If		
		
		'specific to Quick Find combo
		document.all("cboQFind").style.display = ""

		If document.forms(0) is nothing then
			exit sub
		End If		
		
		sForm = document.forms(0).name
		
		if document.all(sForm) is nothing then
			exit sub
		end if
		
		if document.all(sForm).name = "calculators" then
			if (document.all("Show") is nothing) or (document.all("Hide") is nothing) then
				exit sub
			end if
			document.all.Hide.style.display = ""
			document.all.Show.style.display = "none"
		end if
		if document.all(sForm).name = "DeathPlannerGraph" then
			document.all.Hide.style.display = ""
			document.all.Show.style.display = "none"
		end if
		if document.all(sForm).name = "DisabilityPlannerGraph" then
			document.all.Hide.style.display = ""
			document.all.Show.style.display = "none"
		end if
		If trim(document.all(sForm).name) <> "balance" and trim(document.all(sForm).name) <> "frmTransact" and trim(document.all(sForm).name) <> "frmCharter" and trim(document.all(sForm).name) <> "index_custom" and trim(document.all(sForm).name) <> "goal_planner" and trim(document.all(sForm).name) <> "frmMainDetails" and trim(document.all(sForm).name) <> "frmTabs"  and trim(document.all(sForm).name) <> "reports" then
			
			If lcase(document.all(sForm).name) <> "frmmoneyweb" then				
				ShowFrames()				
				ShowFramesT()
			Else
				If instr(navigator.appversion, "MSIE 4") > 0 then
					ShowFramesMW()
				End If
				If (instr(navigator.appversion, "MSIE 5") > 0) and (instr(navigator.appversion, "MSIE 5.5") = 0) then
					ShowFramesMW()
				End If
			End if			
			For Each element In	document.all(sForm).elements
				If (trim(element.type) = "select-one" or trim(element.type) = "select-multiple") and trim(left(element.id,4)) = "Hide"  Then
					If len(element.id) > 4 Then
						iElement = right(trim(element.id),len(trim(element.id)) - 4)
						sTemp = element.name
						If document.all(sTemp) is nothing then
							exit sub
						end if
						document.all(sTemp).style.display = ""
					End if
				End If
			Next
		elseif trim(document.all(sForm).name) = "frmCharter" then
			'For iCount = 0 to cInt(document.all("lRowNumber").value) step 1
				'If iCount <> cInt(document.all("lRowNumber").value) or iCount = 0 then
					'document.all("cboOccupation").style.display = ""
				'End If

				If document.all("cboOccupation") is nothing then
					Exit Sub
				End If
				document.all("cboOccupation").style.display = ""
				
				If document.all("cboBank") is nothing then
					Exit Sub
				End If
				If document.all("fraBankBranch") is nothing then
					Exit Sub
				End If
				If document.all("fraBroker") is nothing then
					Exit Sub
				End If
				If document.all("cboBeneficiary") is nothing then
					Exit Sub
				End If
				
				document.all("cboBank").style.display = ""
				document.all("fraBankBranch").style.display = ""
				document.all("fraBroker").style.display = ""
				document.all("cboBeneficiary").style.display = ""
			'Next
		elseif trim(document.all(sForm).name) = "reports" then
		
		end if
	End Sub
	
	Sub OpenAboutModal()
		sURL = "../modals/aboutkeytax.asp"
		sReturnedVal = window.showModalDialog (sURL, ,"dialogWidth:700px; dialogheight:400px; scroll=no; status=no")
	End Sub
	
	sub showtestdatafrommenu()
		sReturnvalue = window.showModelessDialog("../help/demo_test_data.asp", , "dialogWidth:500px; dialogheight:600px; resizable:yes; status:no")
	end sub

	sub showbulletins()
		'if there is news to display, pop up the new window and display it!
		Window.open "http://lzg1504_01/KeyTax/web/pages/news/bulleting.asp",null, "toolbar=no, menubar=no, location=no, directories=no, width=400, height=200, scrollbars=yes, resizable=yes"
	end sub
	
</script>

<head>
<style TYPE="text/css">
/* Define the style sheet for the menu bar */
#menubar {position: relative; color:333366; font: verdana; size: 12pt; font-weight: bold; cursor: default; background: #848AAD ; z-index: 99}
/* Style for the top-level menu items */
#menubar .root {border-top: 1px #848AAD solid; border-left: 1px #848AAD solid; border-right: 1px #848AAD solid; padding-left: 2pt; padding-right: 2pt; z-index: 99}
/* Style for nested menus */
#menubar TABLE {font: menu; color:333366; margin-left: 0pt; padding-left: 2pt; padding-right: 2pt; background: #848AAD; border-left: 1px #444444 solid; border-right: 2px #444444 solid; border-bottom: 2px #444444 solid; border-top: 1px #444444 solid; display: none; position: absolute; z-index: 99}
#menubar TABLE TD {padding-top: 2pt; padding-bottom: 2pt; padding-left: 2pt; padding-right: 15pt; margin: 0pt; z-index: 99}
/* Style for highlighted elements */
#menubar .highlight {color: white; background: #636994}
/* Style for highlighting disabled elements */
#menubar .disabledhighlight {background: #848AAD; color: white}
/* Style for disabled and break elements */
#menubar #break, #menubar .disabled {color: white}
/* Remove padding and margins for break elements (horizontal bars) */
#menubar #break {padding: 0pt; margin: 0pt}
/* Style for the arrow representing more choices */
#menubar .more {height: 6px; font: 6pt webdings; position: relative; left: 14pt; top: 0pt; margin: 0pt; padding: 0pt; float: right;}
#menubar .left {margin-left: -11pt}
/* Used for the color picker sub-menu */
#colors TD {width: 10pt; height: 10pt; font-size: 1pt; padding: 0pt; margin: 0pt}UL {font: 10pt verdana}
.menucells {background: #ADB2C6;}
</style>

</head>

<input type="hidden" name="bMenuClicked" id="bMenuClicked" value="0">

<table onscroll="ScrollerAction()" style="position:relative; visibility:show; left:0; top:0; ; z-index: 95" ID="menuBar" NAME="menuBar" ONCLICK="processClick()" ONMOUSEOVER="doHighlight(window.event.toElement)" ONKEYDOWN="processKey()" cellspacing="0" cellpadding="0">

<tr style="height:20">
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="50" ID="Menu_3">
		
		Main
		
		<table cellspacing="0" cellpadding="0" border="0">
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../homepage/default.asp')">Homepage</td>
			</tr>
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../homepage/default.asp#WhatsNew')">What's new?</td>
			</tr>
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../homepage/default.asp#DemoSite')">Demo site</td>
			</tr>
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../homepage/default.asp#ContactUs')">Contact us</td>
			</tr>
			<%if sAllowBulletins = "Y" then%>
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../homepage/default.asp#Bulletins')">View bulletins</td>
			</tr>
			<% end if %>
		</table>	
	
	</td>
	<% if sShowFundMenu = "Y" then%>
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="50" ID="Menu_0">
		
		Funds
		
		<table cellspacing="0" cellpadding="0" BORDER="0">
		
		<%
		
		' Determine if the user is allowed to add a fund
		If sAllowFundAdd = "Y" then
		
		%>
		
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../funds/add_fund.asp')">Add a fund</td>
		</tr>	
		
		<%end if%>
		
		<%
		
		' Determine if the user is allowed to change a fund 
		If sAllowFundChange = "Y" then
		
		%>
		
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../funds/Change_fund.asp')">Change fund details</td>
		</tr>					
		
		<%end if%>
		</table>	
	</td>
	<% end if %>
	

	<!--		REMOVED BY ANTHONY BECAUSE ALL USERS MUST BE ABLE TO CHANGE THEIR PASSWORD		AND EMAILL ADDRESS 		<% if sShowUserMenu = "Y" then %>	 -->
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="50" ID="Menu_1">
	
		Users
		
		<table cellspacing="0" cellpadding="0" BORDER="0">
		<%
		
		'Determine whether the user is allowed to add another user
		
		if sAllowUserAdd = "Y" AND UCase(session("KeyTaxUser")) <> "DEMO" then
		
		%>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../register/register.asp')">Add a user</td>
		</tr>	
		
		<%end if%>
		
		<% if sAllowUserChange = "Y" then %>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../users/UserDetails.asp')">Change user details</td>
		</tr>
		<% end if %>
		
		<% if sAllowUserList = "Y" then%>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../users/UserList.asp')">User search</td>
		</tr>	
		<% end if%>
		</table>		
	</td>
	<!-- <% end if %> -->
	
	
	<% if sShowEmpMenu = "Y" then%>
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="80" ID="Menu_2">								
	
		Employers								
		
		<table cellspacing="0" cellpadding="0" border="0">					
			
			<% if sAllowEmpAdd = "Y" then%>
			
			<tr class="menucells">							
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../employers/add_employer.asp')">Add an employer</td>					
			</tr>
			<% end if %>
			
			<% if sAllowEmpChange = "Y" then%>
			
			<tr class="menucells">							
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../employers/edit_employer.asp')">Edit an employer</td>
			</tr>
			
			<% end if %>
		</table>				
	</td>
	<% end if %>
	
	<% if sShowDirectiveMenu = "Y" then%>
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="80" ID="Menu_3">
		
		Directives
		
		<table cellspacing="0" cellpadding="0" border="0">
		<%if sAllowEnquiryOnly <> "Y" then%>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../directive/directive.asp')">Request a directive</td>
		</tr>
		<%end if%>
		<% if sAllowEnquiryOnly <> "Y" then %>	
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../directive/dir_cancel.asp')">Cancel a finalised directive</td>
		</tr>
		<% end if %>
		<!--<tr class="menucells">			<td align="LEFT" NOWRAP ONCLICK="CallLink('../directive/enq_directive.asp')">View directive details</td>		</tr>		-->
		<tr class="menucells">			
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../directive/track_directive.asp')">Track directives</td>		
		</tr>
		<% if sAllowEnquiryOnly <> "Y" then %>
		<tr class="menucells">			
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../directive/del_directive.asp')">Delete a request</td>		
		</tr>
		<% end if %>
		</table>	
	
	</td>
	<% end if %>
	
	<% if sShowAdminMenu = "Y" then%>
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="50" ID="Menu_4">
		
		Admin
		
		<table cellspacing="0" cellpadding="0" border="0" style>
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../admin/main_report.asp')">Reports</td>
			</tr>
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../admin/user_info.asp')">Reset user passwords</td>
			</tr>
			<!--Shane: New code added. Starts here-->
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../admin/interface.asp')">View interface status</td>
			</tr>
			<!--New code added. Ends here-->	
		</table>		
	
	</td>
	<% end if %>
	<!-- Shane: New code added 2002/12/23 so that Security User only has access to the "reset user password function in the Admin drop down-->
	<% if sShowAdminMenuResetPass = "Y" then%>
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="50" ID="Menu_4">
		
		Admin
		
		<table cellspacing="0" cellpadding="0" border="0" style>			
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../admin/user_info.asp')">Reset user passwords</td>
			</tr>				
		</table>		
	
	</td>
	<% end if %>
	<%If sShowBulletinMenu = "Y" then %>
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="80" ID="Menu_4">
	
		News bulletins
					
		<table cellspacing="0" cellpadding="0" border="0" style>
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../news/AddBulletin.asp')">Add news bulletins</td>
			</tr>
			<tr class="menucells">
				<td align="LEFT" NOWRAP ONCLICK="CallLink('../news/EditBulletin.asp')">Edit news bulletins</td>
			</tr>
		</table>
	
	</td>
	<% end if %>
	
	
	
	<td align="CENTER" NOWRAP CLASS="root" WIDTH="50" ID="Menu_5">
		
		Help
		
		<table cellspacing="0" cellpadding="0" border="0">
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../help/help.asp')">Online help / FAQ</td>
		</tr>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../help/disclaimer.asp?show=disclaimer')">Disclaimer</td>
		</tr>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('../help/disclaimer.asp?show=privacy')">Privacy policy</td>
		</tr>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="CallLink('mailto:info@keytax.co.za?subject=KeyTax site feedback')">Feedback</td>
		</tr>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="showtestdatafrommenu()">Demo test data</td>
		</tr>
		<tr class="menucells">
			<td align="LEFT" NOWRAP ONCLICK="OpenAboutModal()">About KeyTax</td>
		</tr>
		</table>	
	
	</td>
	<td align="center" valign="top" NOWRAP CLASS="root" WIDTH="25" ID="Menu_6">
		
		&nbsp;<img src="../../pics/icon_help.gif" id="Menu_6" WIDTH="20" HEIGHT="20">
			
		<table cellspacing="0" cellpadding="0" border="0" width="200" align="left">
			<tr bgcolor="#636994">
				<td align="left">
					
					<font color="white" size="1">				
					
					<br>
					<u>Help for this page:</u>
					
					<br><br>
					<%
									
					dim strPageHelp
									
					if strPageHelp = "" then
						Response.Write "There is no additional help available for this page, click <a href=""../help/help.asp""><font color=white>here</font></a> to go to the KeyTax Online Help Section"
					else
						Response.Write strPageHelp
					end if
									
					%>
					
					</font>
					
					<br><br>
				</td>
			</tr>
		</table>
	</td>
	<div style="display:none"><input type="hidden" name="bMenuDirty" id="bMenuDirty" value="0"></div>
</tr>
</table>

